package cn.bocweb.spinning.view.adapter;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import butterknife.Bind;
import butterknife.ButterKnife;
import cn.bocweb.spinning.R;

/**
 * Created by chenchangxing on 15/12/29.
 */
public class MyquizListAdapter extends RecyclerView.Adapter {
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_my_quiz_list, null);
        ViewHolder holder = new ViewHolder(view);
        return holder;
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 3;
    }

    /**
     * This class contains all butterknife-injected Views & Layouts from layout file 'item_my_quiz_list.xml'
     * for easy to all layout elements.
     *
     * @author ButterKnifeZelezny, plugin for Android Studio by Avast Developers (http://github.com/avast)
     */
    static class ViewHolder extends RecyclerView.ViewHolder {
        @Bind(R.id.my_quiz_icon)
        ImageView myQuizIcon;
        @Bind(R.id.my_quiz_name)
        TextView myQuizName;
        @Bind(R.id.my_quiz_time)
        TextView myQuizTime;
        @Bind(R.id.my_quiz_content)
        TextView myQuizContent;

        ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }
}
